<?php

// $Id$

require_once(TANGRA_MAIN_DIR.'form/fields/datetime/form_field_datetime_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/fields/textarea/form_field_textarea_view.class.php');
require_once(TANGRA_MAIN_DIR.'form/guardable_form_view.class.php');


require_once($WSC->get_site_inc_dir().'modules/form_field_fckeditor/form_field_fckeditor_view.class.php');


class CI_Article_Form_View extends Guardable_Form_View {
	function __construct(Form &$form) {
		parent::__construct($form);

		$f_title = $form->get_field('title');
		$f_title_view = new Form_Field_FCKeditor_View($form->get_name().'_'.$f_title->get_name(), $f_title, 500, 80, array('ToolbarSet' => 'Basic'));
		$this->add_field_view('title', $f_title_view);

		$f_content = $form->get_field('content');
		$f_content_view = new Form_Field_FCKeditor_View($form->get_name().'_'.$f_content->get_name(), $f_content, 500, 500);
		$this->add_field_view('content', $f_content_view);

		$f_intro = $form->get_field('intro');
		$f_intro_view = new Form_Field_FCKeditor_View($form->get_name().'_'.$f_intro->get_name(), $f_intro, 500, 120, array('ToolbarSet' => 'Basic'));
		$this->add_field_view('intro', $f_intro_view);

		$f_created = $form->get_field('created');
		$f_created_view = new Form_Field_Datetime_View($form->get_name().'_'.$f_created->get_name(), $f_created);
		$this->add_field_view('created', $f_created_view);
	}
}